#include "stdio.h"
#include "string.h"

struct tmp {
	char filename[6];
	char buf[10];
	char len;
	char offset;
};
struct tmp stmp;

void myprintk1(char *filename, char *buf, char len, char offset)
{
	char i;
	printf("filename: %s\n", filename);
	printf("buf:");
	for(i=0; i<10; i++)
		printf(" %d, ", buf[i]);
	printf("\n");
	printf("len: %d\n", len);
	printf("offset: %d\n", offset);
	
	memcpy(stmp.filename,filename,6);
	memcpy(stmp.buf,buf,10);
	stmp.len = len;
	stmp.offset = offset;
	
	printf("stmp.filename: %s\n", stmp.filename);
	printf("stmp.buf:");
	for(i=0; i<10; i++)
		printf(" %d, ", stmp.buf[i]);
	printf("\n");
	printf("stmp.len: %d\n", stmp.len);
	printf("stmp.offset: %d\n", stmp.offset);
}

void myprintk2()
{
	
}

int main()
{
	int i,j;
	char filename[6]= {'t','e','s','t','.','c'};
	char buf[10] = {0,1,2,3,4,5,6,7,8,9};
	char len = 10;
	char offset = 3;
	myprintk1(filename, (char *)&buf, len, offset);
	return 0;
}